package com.hscm.boss.mvc.model.from.payWay;


import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ConfigProductWayFrom {

    @NotNull(message = "需要支付的产品编码")
    @Size(min = 5,max = 30,message = "支付的编码的位数在{min}和{max}之间")
    private String productCode;

    @NotNull(message = "需要支付的方式编码")
    @Size(min = 5,max = 15,message = "支付的方式的位数在{min}和{max}之间")
    private String wayCode;

    @NotNull(message = "需要支付的类型编码")
    @Size(min = 5,max = 30,message = "需要支付的类型的位数在{min}和{max}之间")
    private String typeCode;


    @NotNull(message = "费率不能为空")
    @DecimalMin(value = "0.01",message = "费率不能低于{value}")
    @DecimalMax(value = "100",message = "费率不能高于{value}")
    private BigDecimal payRate;

    @NotNull(message = "排序位置不能为空")
    @Min(value =  1,message = "从1开始")
    private Integer sorts;
}
